/**
 * Created by xiebang
 * Description
 * User:小谢
 * Date:2021-09-14
 * Time:9:45
 */

class Shape{
    public void draw(){

    }
}
class Cycle extends Shape{

    @Override
    public void draw() {
        System.out.println("画一个圆●");
    }
}
class Rect extends Shape{

    @Override
    public void draw() {
        System.out.println("画一个方块□");
    }
}
class Flower extends Shape{

    @Override
    public void draw() {
        System.out.println("花一朵小红花❀");
    }
}
public class TestDemo2 {
    public static void drawMap(Shape shape){
        shape.draw();
    }
    public static void main(String[] args) {
        Cycle cycle =new Cycle();
        drawMap(cycle);
        Rect rect = new Rect();
        drawMap(rect);

        Flower flower = new Flower();
        drawMap(flower);
    }



}
